
package com.apes.scm.masterdata.car.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;


/**
 * 功能：汽车等级
 *
 * @Auther: linwz
 * @Date: 2018/7/23 13:42
 */

@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = CarLevel.CONST_TABLE_NAME)
public class CarLevel extends Model {
    public static final String CONST_TABLE_NAME = "mas_car_level";

    @Id
    @Column(name = "id", length = 60)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "等级编码",padding = 3)
    @Comment("等级编码")
    private String id;//等级编码

    @Column(name = "name",length = 120, nullable = false)
    @Comment("等级名称")
    private String name;//等级名称

}